package com.chenyi.web.controller.shop;

import com.chenyi.common.annotation.UserRequired;
import com.chenyi.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 参数配置 信息操作处理
 *
 * @author wangkh
 */
@RestController
@RequestMapping("/shop/config")
public class ShopConfigController {
    @Autowired
    private ISysConfigService configService;

    /**
     * 根据参数键名查询参数值
     */
    @UserRequired
    @GetMapping(value = "/configKey/{configKey}")
    public ResponseEntity<Object> getConfigKey(@PathVariable String configKey)
    {
        return ResponseEntity.ok(configService.selectConfigByKey(configKey));
    }

}
